HipAssetManager

Undocumented in source.
class HipAssetManager {}

Members

Static functions

addOnCompleteHandler
void addOnCompleteHandler(IHipAssetLoadTask task, void delegate(HipAsset) onComplete)
Undocumented in source. Be warned that the author may not have intended to support it.
addOnLoadingFinish
void addOnLoadingFinish(void delegate() onFinish)
Undocumented in source. Be warned that the author may not have intended to support it.
awaitLoad
void awaitLoad()

Stops the code from running and awaits asset manager to finish loading

awaitTask
void awaitTask(IHipAssetLoadTask task)
Undocumented in source. Be warned that the author may not have intended to support it.
createTilemap
IHipTilemap createTilemap(uint width, uint height, uint tileWidth, uint tileHeight)
Undocumented in source. Be warned that the author may not have intended to support it.
dispose
void dispose()

Cleans everything up. Puts AssetManager in an invalid state

get
T get(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
get
T get(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
getAsset
HipAsset getAsset(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
getAssetsToLoadCount
int getAssetsToLoadCount()

Returns whether asset manager is loading anything

getStringAsset
string getStringAsset(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
initialize
void initialize()
Undocumented in source. Be warned that the author may not have intended to support it.
isLoading
bool isLoading(string file, uint line)

Returns whether asset manager is loading anything

loadAsset
IHipAssetLoadTask loadAsset(TypeInfo tID, string path, const(ubyte)[] extraData, string file, size_t line)
Undocumented in source. Be warned that the author may not have intended to support it.
loadWorker
HipWorkerThread loadWorker(string taskName, void delegate() loadFn, void delegate(string taskName) onFinish, bool onMainThread)
Undocumented in source. Be warned that the author may not have intended to support it.
registerAsset
void registerAsset(TypeInfo tID, IHipAssetLoadTask delegate(string path, const(ubyte)[] extraData, string file, size_t line) assetFactory)
Undocumented in source. Be warned that the author may not have intended to support it.
tilesetFromAtlas
IHipTileset tilesetFromAtlas(IHipTextureAtlas atlas)
Undocumented in source. Be warned that the author may not have intended to support it.
tilesetFromSpritesheet
IHipTileset tilesetFromSpritesheet(Array2D_GC!IHipTextureRegion sp)
Undocumented in source. Be warned that the author may not have intended to support it.
update
void update()

This function is responsible for calling worker's onTaskFinish on the main thread if it has one. After that, it will execute any deferred task to the AssetManager, such as setting a HipSprite or HipFont asset.

Static variables

assets
HipAsset[string] assets;
Undocumented in source.
completeHandlers
void delegate(HipAsset)[][IHipAssetLoadTask] completeHandlers;
Undocumented in source.
currentTime
float currentTime;
Undocumented in source.
isAsync
bool isAsync;
Undocumented in source.
loadCache
IHipAssetLoadTask[string] loadCache;
Undocumented in source.
loadQueue
IHipAssetLoadTask[] loadQueue;
Undocumented in source.
onEveryLoadFinished
void delegate()[] onEveryLoadFinished;
Undocumented in source.
typedAssetFactory
IHipAssetLoadTask delegate(string path, const(ubyte)[] extraData, string file = __FILE__, size_t line = __LINE__)[string] typedAssetFactory;

Due to a bug in the D Runtime, I can't use TypeInfo over the dll boundaries. is is being used instead of opEquals

workerPool
HipWorkerPool workerPool;
Undocumented in source.

Meta